/*
 * @Description:
 * @version: v0.0.1
 * @Author: ZhouYanPing
 * @Date: 2025-04-05 23:31:58
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2025-04-06 18:11:04
 */
import { defineConfig } from '@rsbuild/core';
import { pluginReact } from '@rsbuild/plugin-react';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

export default defineConfig({
  plugins: [pluginReact()],
  output: {
    assetPrefix: '/',
    distPath: {
      root: 'dist',
      html: '',
      js: 'static/js',
      css: 'static/css',
      svg: 'static/svg',
      font: 'static/font',
      image: 'static/image',
    },
  },
  source: {
    define: {
      'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
    },
  },
  server: {
    publicDir: [
      {
        name: path.join(__dirname, '../', 'lynx-test', 'dist'),
      },
    ],
  },
});
